package electronics;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.PrintWriter;

import common.CBinomial;
import common.InterfaceTest;

/**
 * 		optimal CBinomial : (false, 0.01, 0.5)
 * 		Taux r�ussite sur donn�es developpement : 	81,1965812 %
 * 		Taux r�ussite sur donn�es de test : 		76,9230769 %
 */ 
public class TestClassifieurBinomialElectronics extends InterfaceTest {


	public static void main(String args[]){
		
		listeFichiersApprentissage.add(new File("electronics/training.txt"));
		
		try {

			long start = System.currentTimeMillis(); 

			PrintWriter ecrivain;
			ecrivain =  new PrintWriter(new BufferedWriter(new FileWriter("Binomial_electronics_training_test.csv")));

			ecrivain.println("MOTS_OUTILS_SUPPRIMES;SEUIL_FREQUENCE;K;NB_MOTS_DICO_FILTRE;TAUX_REUSSITE");

			CBinomial cbe = new CBinomial
			(listeFichiersApprentissage, new File("electronics/test.txt"),false,0.01,0.5, false, null);

			cbe.MAJFichierCSVInfluenceSeuilFrequenceEtK(ecrivain);

			ecrivain.close();

			long time= System.currentTimeMillis(); 
			System.out.println("Programme : " + (((time - start)/1000)) + "secondes");
		}
		catch (Exception e){
			e.printStackTrace();
		}
	}
}
